namespace MauiBuilder.Services
{
    /// <summary>
    /// 通知服务接口
    /// 提供跨平台的通知功能抽象
    /// </summary>
    public interface INotificationService
    {
        /// <summary>
        /// 发送简单通知
        /// </summary>
        /// <param name="title">通知标题</param>
        /// <param name="message">通知内容</param>
        /// <param name="notificationId">通知ID（可选）</param>
        Task SendNotificationAsync(string title, string message, int? notificationId = null);
        
        /// <summary>
        /// 发送带操作的通知
        /// </summary>
        /// <param name="title">通知标题</param>
        /// <param name="message">通知内容</param>
        /// <param name="actions">通知操作按钮</param>
        /// <param name="notificationId">通知ID（可选）</param>
        Task SendNotificationWithActionsAsync(string title, string message, 
            Dictionary<string, string>? actions = null, int? notificationId = null);
        
        /// <summary>
        /// 取消指定通知
        /// </summary>
        /// <param name="notificationId">通知ID</param>
        Task CancelNotificationAsync(int notificationId);
        
        /// <summary>
        /// 取消所有通知
        /// </summary>
        Task CancelAllNotificationsAsync();
        
        /// <summary>
        /// 启动定时通知
        /// </summary>
        /// <param name="title">通知标题</param>
        /// <param name="message">通知内容</param>
        /// <param name="intervalSeconds">间隔秒数</param>
        Task StartTimedNotificationAsync(string title, string message, int intervalSeconds = 5);
        
        /// <summary>
        /// 停止定时通知
        /// </summary>
        Task StopTimedNotificationAsync();
        
        /// <summary>
        /// 检查通知权限
        /// </summary>
        /// <returns>是否有通知权限</returns>
        Task<bool> CheckNotificationPermissionAsync();
        
        /// <summary>
        /// 请求通知权限
        /// </summary>
        /// <returns>是否获得权限</returns>
        Task<bool> RequestNotificationPermissionAsync();
        
        /// <summary>
        /// 平台是否支持通知
        /// </summary>
        /// <returns>是否支持</returns>
        bool IsNotificationSupported();
    }
}